import 'package:aweb5/bean/aplus/member_info_entity.dart';

memberInfoEntityFromJson(MemberInfoEntity data, Map<String, dynamic> json) {
	if (json['msg'] != null) {
		data.msg = json['msg']?.toString();
	}
	if (json['data'] != null) {
		data.data = new MemberInfoData().fromJson(json['data']);
	}
	if (json['code'] != null) {
		data.code = json['code']?.toInt();
	}
	return data;
}

Map<String, dynamic> memberInfoEntityToJson(MemberInfoEntity entity) {
	final Map<String, dynamic> data = new Map<String, dynamic>();
	data['msg'] = entity.msg;
	if (entity.data != null) {
		data['data'] = entity.data.toJson();
	}
	data['code'] = entity.code;
	return data;
}

memberInfoDataFromJson(MemberInfoData data, Map<String, dynamic> json) {
	if (json['member_id'] != null) {
		data.memberId = json['member_id']?.toInt();
	}
	if (json['nickname'] != null) {
		data.nickname = json['nickname']?.toString();
	}
	if (json['name'] != null) {
		data.name = json['name']?.toString();
	}
	if (json['parent_id'] != null) {
		data.parentId = json['parent_id']?.toInt();
	}
	if (json['is_group'] != null) {
		data.isGroup = json['is_group']?.toInt();
	}
	if (json['level'] != null) {
		data.level = json['level']?.toInt();
	}
	if (json['status'] != null) {
		data.status = json['status']?.toInt();
	}
	if (json['headimgurl'] != null) {
		data.headimgurl = json['headimgurl']?.toString();
	}
	if (json['mobile'] != null) {
		data.mobile = json['mobile']?.toString();
	}
	if (json['token'] != null) {
		data.token = json['token']?.toString();
	}
	if (json['is_player'] != null) {
		data.isPlayer = json['is_player']?.toInt();
	}
	if (json['is_app_wechat'] != null) {
		data.isAppWechat = json['is_app_wechat']?.toInt();
	}
	return data;
}

Map<String, dynamic> memberInfoDataToJson(MemberInfoData entity) {
	final Map<String, dynamic> data = new Map<String, dynamic>();
	data['member_id'] = entity.memberId;
	data['nickname'] = entity.nickname;
	data['name'] = entity.name;
	data['parent_id'] = entity.parentId;
	data['is_group'] = entity.isGroup;
	data['level'] = entity.level;
	data['status'] = entity.status;
	data['headimgurl'] = entity.headimgurl;
	data['mobile'] = entity.mobile;
	data['token'] = entity.token;
	data['is_player'] = entity.isPlayer;
	data['is_app_wechat'] = entity.isAppWechat;
	return data;
}